import config from "@/config"
import http from "@/utils/request"

export default {
	ware:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/lists`,
			name: "获取仓库列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        add: {
            url: `${config.API_URL}/adminapi/shop.shop_ware/add`,
            name: "添加仓库",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
		edit: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/edit`,
			name: "修改仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/delete`,
			name: "删除仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/deleteAll`,
			name: "删除仓库",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/update_status`,
			name: "修改仓库状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		update_default: {
			url: `${config.API_URL}/adminapi/shop.shop_ware/update_default`,
			name: "修改仓库默认",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	apply:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shopApply/lists`,
			name: "获取供应商列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shopApply/edit`,
			name: "修改供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shopApply/add`,
			name: "添加供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopApply/delete`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/shop.shopApply/deleteAll`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shopApply/update_status`,
			name: "修改供应商状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        getInfo: {
			url: `${config.API_URL}/adminapi/material.shopMaterialCate/all`,
			name: "查询某个类别下的所有毛重",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        whole: {
			url: `${config.API_URL}/adminapi/shop.shopApply/whole`,
			name: "待绑定供应商列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        bindApply: {
			url: `${config.API_URL}/adminapi/shop.shopApply/bindApply`,
			name: "当前账号绑定供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
	},
    bank:{
        lists: {
			url: `${config.API_URL}/adminapi/shop.shopApply/bankAccountLists`,
			name: "获取供应商银行列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
        add: {
            url: `${config.API_URL}/adminapi/shop.shopApply/addBankAccount`,
            name: "添加银行",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        edit: {
			url: `${config.API_URL}/adminapi/shop.shopApply/editBankAccount`,
			name: "修改银行",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopApply/deleteBankAccount`,
			name: "删除银行",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_status: {
			url: `${config.API_URL}/adminapi/shop.shopApply/updateBankAccountStatus`,
			name: "供应商禁用状态",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
        update_default: {
			url: `${config.API_URL}/adminapi/shop.shopApply/setDefaultBankAccount`,
			name: "供应商默认银行",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
    },
}
